#include "BBTableTest.h"

#include <QtTest/QtTest>
#include <QString>
#include <QList>

#include "TestSuite.h"
#include "BBTable.h"

void BBTableTest::setName()
{
	BBTable bbTable;
	QString name( "Test" );

	bbTable.setName( name );

	QCOMPARE( bbTable.getName(), name );
}

void BBTableTest::setColumn()
{
	QMap<QString, QString> columns;
	QString columnName( "test" );
	QString columnType( "int" );
	columns[columnName] = columnType;

	BBTable table;
	table.setColumns( columns );
	
	QCOMPARE( table.getColumnType( columnName ), columnType );
}

void BBTableTest::setColumnType()
{
	BBTable bbTable;
	QString columnName( "test" );
	QString columnType( "int" );

	bbTable.setColumnType( columnName, columnType );

	QCOMPARE( bbTable.getColumnType( columnName ), columnType );
}

REGISTER_TEST_CLASS( BBTableTest );